package com.blb.zycommunity.service.impl;

import com.blb.zycommunity.entity.ZyComment;
import com.blb.zycommunity.mapper.ZyCommentMapper;
import com.blb.zycommunity.service.IZyCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 评论表 服务实现类
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Service
public class ZyCommentServiceImpl extends ServiceImpl<ZyCommentMapper, ZyComment> implements IZyCommentService {

    @Autowired
    private ZyCommentMapper zyCommentMapper;

    @Override
    public List<ZyComment> findComments(String interactionId) {
        return zyCommentMapper.selectComments(interactionId);
    }

    @Override
    public void removeCommentById(String commentId) {
        zyCommentMapper.deleteCommentById(commentId);
    }
}
